package com.study.zouchao.superproject.qustionadd.contract;

import android.content.Intent;
import android.support.v7.app.AlertDialog;

import com.study.zouchao.superproject.qustionadd.model.result.questionadd.QuestionAddResult;
import com.study.zouchao.superproject.qustionadd.model.result.updateimg.QuestionUpdateImgResult;

import java.util.Map;

import rx.Observable;


/**
 * Created by Administrator on 2017/4/25.
 */

public class IQuestionAddContract {

    public interface IQuestionAddModel {

        Observable<QuestionUpdateImgResult> updateImg(Map<String, String> params);

        Observable<QuestionAddResult> questionAdd(Map<String, String> params);
    }

    public interface IQuestionAddView {
        //
        void toggleLoading(boolean isShow);
        //成功上传图片
        void successUpdateImg(String serverUrl);
        //
        void showTitleError(String errorMsg);
        //
        void showContentError(String errorMsg);
        //
        void finishCurrentActivity();
        //
        void gotoActivity(Class targetActivity, String K, String V);
        //
        void showEnsureAlertDialog();
        //
        void startUploadText();
        //
        void showSnackBar(String title, int showLength);
    }

    public interface IQuestionAddPresenter {
        //用户点击选择图片提示框
        void clickChoosePicDialog(int itemIndex);
        //onActivityResult
        void judgeActivityResult(int requestCode, int resultCode, Intent data);
        //
        void prepareUploadText(String title, String content, String reward, String rewardPrice, String contact);
        //view销毁时调用
        void onDestoryPresnter();
        //
        AlertDialog getEnsureUploadAlertDialog(String title, String content);
        //
        void startUploadText(String title, String content, String reward, String rewardPrice, String contact);
        //
        void cancelUploadProgressDialog();
        //
        void setTagId(String tagId);
    }
}
